1 About

1.2 Comments and feedback

If you wish to comment please open an issue:

1.3 Citation

If you wish to refer to any of the material from this report please cite as:

  • Anderson, B., (2020) Air Quality in Southampton (UK): Exploring the effect of UK covid 19 lockdown on air quality , Sustainable Energy Research Group, University of Southampton: Southampton, UK.

Report circulation:

  • Public

This work is (c) 2020 the University of Southampton and is part of a collection of air quality data analyses.

2 Introduction

lastHA <- max(fixedDT[source == "hantsAir"]$dateTimeUTC)
diffHA <- lubridate::now() - lastHA
lastAURN <- max(fixedDT[source == "AURN"]$dateTimeUTC)
diffAURN <- lubridate::now() - lastAURN

Data for Southampton downloaded from :

Southampton City Council collects various forms of air quality data at the sites shown in Table 2.1. The data is available in raw form from http://www.hantsair.org.uk/hampshire/asp/Bulletin.asp?la=Southampton&bulletin=daily&site=SH5.

Some of these sites feed data to AURN. The data that goes via AURN is ratified to check for outliers and instrument/measurement error. AURN data less than six months old has not undergone this process. AURN data is (c) Crown 2020 copyright Defra and available for re-use via https://uk-air.defra.gov.uk, licenced under the Open Government Licence (OGL).

In this report we use data from the following sources:

Table 2.1 shows the available sites and sources. Note that some of the non-AURN sites appear to have stopped updating recently. For a detailed analysis of recent missing data see Section 12.1.

t <- fixedDT[!is.na(value), .(nObs = .N, firstData = min(dateTimeUTC), latestData = max(dateTimeUTC), nMeasures = uniqueN(pollutant)), 
    keyby = .(site, source)]

kableExtra::kable(t, caption = "Sites, data source and number of valid observations. note that measures includes wind speed and direction in the AURN sourced data", 
    digits = 2) %>% kable_styling()
Table 2.1: Sites, data source and number of valid observations. note that measures includes wind speed and direction in the AURN sourced data
site source nObs firstData latestData nMeasures
Southampton - A33 Roadside (near docks, AURN site) hantsAir 85240 2017-01-01 00:00:00 2020-05-29 23:00:00 3
Southampton - Background (near city centre, AURN site) hantsAir 161016 2017-01-25 11:00:00 2020-05-29 23:00:00 6
Southampton - Onslow Road (near RSH) hantsAir 82232 2017-01-01 00:00:00 2020-04-15 07:00:00 3
Southampton - Victoria Road (Woolston) hantsAir 60078 2017-01-01 00:00:00 2020-04-01 06:00:00 3
Southampton A33 (via AURN) AURN 218726 2017-01-01 00:00:00 2020-05-29 23:00:00 8
Southampton Centre (via AURN) AURN 341279 2017-01-01 00:00:00 2020-05-29 23:00:00 13

To avoid confusion and ‘double counting’, in the remainder of the analysis we replace the Southampton AURN site data with the data for the same site sourced via AURN as shown in Table 2.2. This has the disadvantage that the data is slightly less up to date (see Table 2.1). As will be explained below in the comparative analysis we will use only the AURN data to avoid missing data issues.

fixedDT <- fixedDT[!(site %like% "AURN site")]

t <- fixedDT[!is.na(value), .(nObs = .N, nPollutants = uniqueN(pollutant), lastDate = max(dateTimeUTC)), keyby = .(site, 
    source)]

kableExtra::kable(t, caption = "Sites, data source and number of valid observations", digits = 2) %>% kable_styling()
Table 2.2: Sites, data source and number of valid observations
site source nObs nPollutants lastDate
Southampton - Onslow Road (near RSH) hantsAir 82232 3 2020-04-15 07:00:00
Southampton - Victoria Road (Woolston) hantsAir 60078 3 2020-04-01 06:00:00
Southampton A33 (via AURN) AURN 218726 8 2020-05-29 23:00:00
Southampton Centre (via AURN) AURN 341279 13 2020-05-29 23:00:00

We use this data to compare:

  • pre and during-lockdown air quality measures
  • air quality measures during lockdown 2020 with average measures for the same time periods in the preceding 3 years (2017-2019)

It should be noted that air pollution levels in any given period of time are highly dependent on the prevailing meteorological conditions. As a result it can be very difficult to disentangle the affects of a reduction in source strength from the affects of local surface conditions. This is abundantly clear in the analysis which follows given that the Easter weekend was forecast to have very high import of pollution from Europe and that the wind direction and speed was highly variable across the lockdown period (see Figure 10.1).

Further, air quality is not wholly driven by sources that lockdown might suppress and indeed that suppression may lead to rebound affects. For example we might expect more emissions due to increased domestic heating during cooler lockdown periods. As a result the analysis presented below must be considered a preliminary ‘before meteorological adjustment’ and ‘before controlling for other sources’ analysis of the affect of lockdown on air quality in Southampton.

For much more detailed analysis see a longer and very messy data report.

3 WHO air quality thresholds

A number of the following plots show the relevant WHO air quality thresholds and limits. These are taken from:

4 Nitrogen Dioxide (no2)

yLab <- "Nitrogen Dioxide (ug/m3)"
no2dt <- fixedDT[pollutant == "no2"]

Figure 4.1 shows the most recent hourly data.

recentDT <- no2dt[obsDate > myParams$recentCutDate]
p <- makeDotPlot(recentDT, xVar = "dateTimeUTC", xLab = "Date & Time", yVar = "value", byVar = "site", yLab = yLab)

p <- p + scale_x_datetime(date_breaks = "2 day", date_labels = "%a %d %b") + theme(axis.text.x = element_text(angle = 90, 
    hjust = 1))

p <- p + geom_hline(yintercept = myParams$hourlyNo2Threshold_WHO) + labs(caption = paste0(myParams$lockdownCap, 
    myParams$weekendCap, "\nReference line = WHO hourly threshold (", myParams$hourlyNo2Threshold_WHO, ")"))

# final plot - adds annotations
yMin <- min(recentDT$value)
yMax <- max(recentDT$value)

p <- addLockdownDateTime(p, yMin, yMax)
addWeekendsDateTime(p, yMin, yMax) + guides(colour = guide_legend(ncol = 2))
Nitrogen Dioxide levels, Southampton (hourly, recent)

Figure 4.1: Nitrogen Dioxide levels, Southampton (hourly, recent)

Figure 4.2 shows the most recent hourly data by date and time of day.

recentDT[, `:=`(time, hms::as_hms(dateTimeUTC))]
yMin <- min(recentDT$time)
yMax <- max(recentDT$time)
p <- profileTilePlot(recentDT, yLab)
p <- addLockdownDate(p, yMin, yMax)
addWeekendsDate(p, yMin, yMax) + labs(caption = paste0(myParams$lockdownCap, myParams$weekendCap))
Nitrogen Dioxide levels, Southampton (hourly, recent)

Figure 4.2: Nitrogen Dioxide levels, Southampton (hourly, recent)

Figure 4.3 shows the most recent mean daily values compared to previous years for the two AURN sites which do not have missing data. We have shifted the dates for the comparison years to ensure that weekdays and weekends line up. Note that this plot shows daily means with no indications of variance. Visible differences are therefore purely indicative at this stage.

plotDT <- no2dt[site %like% "via AURN" & fixedDate <= lubridate::today() & fixedDate >= myParams$comparePlotCut, 
    .(meanVal = mean(value), medianVal = median(value), nSites = uniqueN(site)), keyby = .(fixedDate, compareYear, 
        site)]

# final plot - adds annotations
yMin <- min(plotDT$meanVal)
yMax <- max(plotDT$meanVal)

p <- compareYearsPlot(plotDT, xVar = "fixedDate", yVar = "meanVal", colVar = "compareYear")

p <- addLockdownDate(p, yMin, yMax) + labs(x = "Date", y = "Daily mean", caption = paste0(myParams$lockdownCap, 
    myParams$weekendCap, myParams$noThresh))

p <- addWeekendsDate(p, yMin, yMax) + scale_x_date(date_breaks = "7 day", date_labels = "%a %d %b", date_minor_breaks = "1 day")

p + facet_grid(site ~ .) + theme(strip.text.y.right = element_text(angle = 90))
Comparative Nitrogen Dioxide levels 2020 vs 2017-2019, Southampton (daily mean)

Figure 4.3: Comparative Nitrogen Dioxide levels 2020 vs 2017-2019, Southampton (daily mean)

Figure 4.4 and 4.5 show the % difference between the daily means for 2020 vs 2017-2019 (reference period). In both cases we can see that NO2 levels in 2020 were generally already lower than the reference period yet are not consistently lower even during the lockdown period. The affects of covid lockdown are not clear cut…

dailyDT <- makeDailyComparisonDT(no2dt[site %like% "via AURN" & fixedDate >= myParams$comparePlotCut])

compareYearsDiffPlotDaily(dailyDT) + labs(caption = paste0(myParams$lockdownCap, myParams$weekendCap))
## [1] "Max drop %:-93"
## [1] "Max increase %:124"
Percentage difference in daily mean Nitrogen Dioxide levels 2020 vs 2017-2019, Southampton

Figure 4.4: Percentage difference in daily mean Nitrogen Dioxide levels 2020 vs 2017-2019, Southampton

weeklyDT <- makeWeeklyComparisonDT(no2dt[site %like% "via AURN" & fixedDate >= myParams$comparePlotCut])

compareYearsDiffPlotWeekly(weeklyDT, ldStart = myParams$lockDownStartDate, ldEnd = myParams$lockDownEndDate) + 
    labs(caption = paste0(myParams$lockdownCap))
Percentage difference in weekly mean Nitrogen Dioxide levels 2020 vs 2017-2019, Southampton

Figure 4.5: Percentage difference in weekly mean Nitrogen Dioxide levels 2020 vs 2017-2019, Southampton

Beware seasonal trends and meteorological affects

5 Oxides of Nitrogen (nox)

yLab <- "Oxides of Nitrogen (ug/m3)"
noxdt <- fixedDT[pollutant == "nox"]

Figure 5.1 shows the most recent hourly data.

recentDT <- noxdt[!is.na(value) & obsDate > myParams$recentCutDate]
p <- makeDotPlot(recentDT, xVar = "dateTimeUTC", xLab = "Date & Time", yVar = "value", byVar = "site", yLab = yLab)

p <- p + scale_x_datetime(date_breaks = "2 day", date_labels = "%a %d %b") + theme(axis.text.x = element_text(angle = 90, 
    hjust = 1)) + labs(caption = paste0(myParams$lockdownCap, myParams$weekendCap, myParams$noThresh))

# final plot - adds annotations
yMin <- min(recentDT$value)
yMax <- max(recentDT$value)

p <- addLockdownDateTime(p, yMin, yMax)

addWeekendsDateTime(p, yMin, yMax)
Oxides of nitrogen levels, Southampton (hourly, recent)

Figure 5.1: Oxides of nitrogen levels, Southampton (hourly, recent)

Figure 5.2 shows the most recent hourly data by date and time of day.

recentDT[, `:=`(time, hms::as_hms(dateTimeUTC))]
yMin <- min(recentDT$time)
yMax <- max(recentDT$time)
p <- profileTilePlot(recentDT, yLab)
addWeekendsDate(p, yMin, yMax) + labs(caption = paste0(myParams$lockdownCap, myParams$weekendCap))
Oxides of nitrogen levels, Southampton (hourly, recent)

Figure 5.2: Oxides of nitrogen levels, Southampton (hourly, recent)

Figure 5.3 shows the most recent mean daily values compared to previous years for the two AURN sites.

plotDT <- noxdt[site %like% "via AURN" & fixedDate <= lubridate::today() & fixedDate >= myParams$comparePlotCut, 
    .(meanVal = mean(value), medianVal = median(value), nSites = uniqueN(site)), keyby = .(fixedDate, compareYear, 
        site)]

# final plot - adds annotations
yMin <- min(plotDT$meanVal)
yMax <- max(plotDT$meanVal)

p <- compareYearsPlot(plotDT, xVar = "fixedDate", yVar = "meanVal", colVar = "compareYear")
p <- addLockdownDate(p, yMin, yMax) + labs(x = "Date", y = "Daily mean", caption = paste0(myParams$lockdownCap, 
    myParams$weekendCap, myParams$noThresh))
p <- addWeekendsDate(p, yMin, yMax)

p + facet_grid(site ~ .) + theme(strip.text.y.right = element_text(angle = 90))
Oxides of nitrogen levels, Southampton (daily mean)

Figure 5.3: Oxides of nitrogen levels, Southampton (daily mean)

Figure 5.4 and 5.5 show the % difference between the daily and weekly means for 2020 vs 2017-2019 (reference period).

plotDT <- makeDailyComparisonDT(noxdt[site %like% "via AURN" & fixedDate >= myParams$comparePlotCut])

compareYearsDiffPlotDaily(plotDT) + labs(caption = paste0(myParams$lockdownCap, myParams$weekendCap))
## [1] "Max drop %:-96"
## [1] "Max increase %:172"
% difference in daily mean Oxides of Nitrogen levels 2020 vs 2017-2019, Southampton

Figure 5.4: % difference in daily mean Oxides of Nitrogen levels 2020 vs 2017-2019, Southampton

plotDT <- makeWeeklyComparisonDT(noxdt[site %like% "via AURN" & fixedDate >= myParams$comparePlotCut])

compareYearsDiffPlotWeekly(plotDT, ldStart = myParams$lockDownStartDate, ldEnd = myParams$lockDownEndDate) + 
    labs(caption = paste0(myParams$lockdownCap, myParams$weekendCap))
% difference in weekly mean Oxides of Nitrogen levels 2020 vs 2017-2019, Southampton

Figure 5.5: % difference in weekly mean Oxides of Nitrogen levels 2020 vs 2017-2019, Southampton

6 Sulphour Dioxide

yLab <- "Sulphour Dioxide (ug/m3)"
so2dt <- fixedDT[pollutant == "so2"]

Figure 6.1 shows the most recent hourly data.

recentDT <- so2dt[!is.na(value) & obsDate > myParams$recentCutDate]
p <- makeDotPlot(recentDT, xVar = "dateTimeUTC", xLab = "Date & Time", yVar = "value", byVar = "site", yLab = yLab)

p <- p + scale_x_datetime(date_breaks = "2 day", date_labels = "%a %d %b") + theme(axis.text.x = element_text(angle = 90, 
    hjust = 1)) + labs(caption = paste0(myParams$lockdownCap, myParams$weekendCap, myParams$noThresh))

yMax <- max(recentDT$value)
yMin <- min(recentDT$value)
p <- addLockdownDateTime(p, yMin, yMax)
addWeekendsDateTime(p, yMin, yMax)
Sulphour Dioxide levels, Southampton (hourly, recent)

Figure 6.1: Sulphour Dioxide levels, Southampton (hourly, recent)

Figure 6.2 shows the most recent hourly data by date and time of day and time of day.

recentDT[, `:=`(time, hms::as_hms(dateTimeUTC))]

yMin <- min(recentDT$time)
yMax <- max(recentDT$time)
p <- profileTilePlot(recentDT, yLab)
addWeekendsDate(p, yMin, yMax) + labs(caption = paste0(myParams$lockdownCap, myParams$weekendCap))
Sulphour Dioxide levels, Southampton (hourly, recent)

Figure 6.2: Sulphour Dioxide levels, Southampton (hourly, recent)

Figure 6.3 shows the most recent mean daily values compared to previous years.

plotDT <- so2dt[site %like% "via AURN" & fixedDate <= lubridate::today() & fixedDate >= myParams$comparePlotCut, 
    .(meanVal = mean(value), medianVal = median(value), nSites = uniqueN(site)), keyby = .(fixedDate, compareYear, 
        site)]

# final plot - adds annotations
yMin <- min(plotDT$mean)
yMax <- max(plotDT$mean)

p <- compareYearsPlot(plotDT, xVar = "fixedDate", yVar = "meanVal", colVar = "compareYear")
p <- addLockdownDate(p, yMin, yMax) + geom_hline(yintercept = myParams$dailySo2Threshold_WHO) + labs(x = "Date", 
    y = "Daily mean", caption = paste0(myParams$lockdownCap, myParams$weekendCap, "\nReference line = WHO daily threshold (", 
        myParams$dailySo2Threshold_WHO, ")"))
p <- addWeekendsDate(p, yMin, yMax)

p + facet_grid(site ~ .) + theme(strip.text.y.right = element_text(angle = 90))
Sulphour dioxide levels, Southampton (daily mean)

Figure 6.3: Sulphour dioxide levels, Southampton (daily mean)

Figure 6.4 and 6.5 show the % difference between the daily and weekly means for 2020 vs 2017-2019 (reference period).

plotDT <- makeDailyComparisonDT(so2dt[site %like% "via AURN" & fixedDate >= myParams$comparePlotCut])

compareYearsDiffPlotDaily(plotDT) + labs(caption = paste0(myParams$lockdownCap))
## [1] "Max drop %:-75"
## [1] "Max increase %:714"
% difference in daily mean Sulphour Dioxide levels 2020 vs 2017-2019, Southampton

Figure 6.4: % difference in daily mean Sulphour Dioxide levels 2020 vs 2017-2019, Southampton

plotDT <- makeWeeklyComparisonDT(so2dt[site %like% "via AURN" & fixedDate >= myParams$comparePlotCut])

compareYearsDiffPlotWeekly(plotDT, ldStart = myParams$lockDownStartDate, ldEnd = myParams$lockDownEndDate) + 
    labs(caption = paste0(myParams$lockdownCap))
% difference in weekly mean Sulphour Dioxide levels 2020 vs 2017-2019, Southampton

Figure 6.5: % difference in weekly mean Sulphour Dioxide levels 2020 vs 2017-2019, Southampton

Beware seasonal trends and meteorological affects

7 Ozone

yLab <- "Ozone (ug/m3)"
o3dt <- fixedDT[pollutant == "o3"]

Figure 7.1 shows the most recent hourly data.

recentDT <- o3dt[!is.na(value) & obsDate > myParams$recentCutDate]
p <- makeDotPlot(recentDT, xVar = "dateTimeUTC", xLab = "Date & Time", yVar = "value", byVar = "site", yLab = yLab)

p <- p + scale_x_datetime(date_breaks = "2 day", date_labels = "%a %d %b") + theme(axis.text.x = element_text(angle = 90, 
    hjust = 1)) + labs(caption = paste0(myParams$lockdownCap, myParams$weekendCap, myParams$noThresh))

yMax <- max(recentDT$value)
yMin <- min(recentDT$value)
p <- addLockdownDateTime(p, yMin, yMax)
addWeekendsDateTime(p, yMin, yMax)
03 levels, Southampton (hourly, recent)

Figure 7.1: 03 levels, Southampton (hourly, recent)

Figure 7.2 shows the most recent hourly data by date and time of day.

recentDT[, `:=`(time, hms::as_hms(dateTimeUTC))]

yMin <- min(recentDT$time)
yMax <- max(recentDT$time)
p <- profileTilePlot(recentDT, yLab)
addWeekendsDate(p, yMin, yMax) + labs(caption = paste0(myParams$lockdownCap, myParams$weekendCap))
Ozone levels, Southampton (hourly, recent)

Figure 7.2: Ozone levels, Southampton (hourly, recent)

Figure 7.3 shows the most recent mean daily values compared to previous years.

plotDT <- o3dt[site %like% "via AURN" & fixedDate <= lubridate::today() & fixedDate >= myParams$comparePlotCut, 
    .(meanVal = mean(value), medianVal = median(value), nSites = uniqueN(site)), keyby = .(fixedDate, compareYear, 
        site)]

# final plot - adds annotations
yMin <- min(plotDT$mean)
yMax <- max(plotDT$mean)

p <- compareYearsPlot(plotDT, xVar = "fixedDate", yVar = "meanVal", colVar = "compareYear")
p <- addLockdownDate(p, yMin, yMax) + geom_hline(yintercept = myParams$dailyO3Threshold_WHO) + labs(x = "Date", 
    y = "Daily mean", caption = paste0(myParams$lockdownCap, myParams$weekendCap, "\nReference line = WHO daily threshold (", 
        myParams$dailyO3Threshold_WHO, ")"))
p <- addWeekendsDate(p, yMin, yMax)
p + facet_grid(site ~ .) + theme(strip.text.y.right = element_text(angle = 90))
Ozone levels, Southampton (daily mean)

Figure 7.3: Ozone levels, Southampton (daily mean)

Figure 7.4 and 7.5 show the % difference between the daily and weekly means for 2020 vs 2017-2019 (reference period).

plotDT <- makeDailyComparisonDT(o3dt[site %like% "via AURN" & fixedDate >= myParams$comparePlotCut])

compareYearsDiffPlotDaily(plotDT) + labs(caption = paste0(myParams$lockdownCap))
## [1] "Max drop %:-53"
## [1] "Max increase %:121"
% difference in daily mean Ozone levels 2020 vs 2017-2019, Southampton

Figure 7.4: % difference in daily mean Ozone levels 2020 vs 2017-2019, Southampton

plotDT <- makeWeeklyComparisonDT(o3dt[site %like% "via AURN" & fixedDate >= myParams$comparePlotCut])

compareYearsDiffPlotWeekly(plotDT, ldStart = myParams$lockDownStartDate, ldEnd = myParams$lockDownEndDate) + 
    labs(caption = paste0(myParams$lockdownCap))
% difference in weekly mean Ozone levels 2020 vs 2017-2019, Southampton

Figure 7.5: % difference in weekly mean Ozone levels 2020 vs 2017-2019, Southampton

Beware seasonal trends and meteorological affects

8 PM 10

yLab <- "PM 10 (ug/m3)"
pm10dt <- fixedDT[pollutant == "pm10"]

Figure 8.1 shows the most recent hourly data.

recentDT <- pm10dt[!is.na(value) & obsDate > myParams$recentCutDate]
p <- makeDotPlot(recentDT, xVar = "dateTimeUTC", xLab = "Date & Time", yVar = "value", byVar = "site", yLab = yLab)

p <- p + scale_x_datetime(date_breaks = "2 day", date_labels = "%a %d %b") + theme(axis.text.x = element_text(angle = 90, 
    hjust = 1)) + labs(caption = paste0(myParams$lockdownCap, myParams$weekendCap, myParams$noThresh))

yMax <- max(recentDT$value)
yMin <- min(recentDT$value)
p <- addLockdownDateTime(p, yMin, yMax)
addWeekendsDateTime(p, yMin, yMax)
PM10 levels, Southampton (hourly, recent)

Figure 8.1: PM10 levels, Southampton (hourly, recent)

Figure 8.2 shows the most recent hourly data by date and time of day.

recentDT[, `:=`(time, hms::as_hms(dateTimeUTC))]

yMin <- min(recentDT$time)
yMax <- max(recentDT$time)
p <- profileTilePlot(recentDT, yLab)
addWeekendsDate(p, yMin, yMax) + labs(caption = paste0(myParams$lockdownCap, myParams$weekendCap))
PM10 levels, Southampton (hourly, recent)

Figure 8.2: PM10 levels, Southampton (hourly, recent)

Figure 8.3 shows the most recent mean daily values compared to previous years.

plotDT <- pm10dt[site %like% "via AURN" & fixedDate <= lubridate::today() & fixedDate >= myParams$comparePlotCut, 
    .(meanVal = mean(value), medianVal = median(value), nSites = uniqueN(site)), keyby = .(fixedDate, compareYear, 
        site)]

# final plot - adds annotations
yMin <- min(plotDT$mean)
yMax <- max(plotDT$mean)

p <- compareYearsPlot(plotDT, xVar = "fixedDate", yVar = "meanVal", colVar = "compareYear")
p <- addLockdownDate(p, yMin, yMax) + geom_hline(yintercept = myParams$dailyPm10Threshold_WHO) + labs(x = "Date", 
    y = "Daily mean", caption = paste0(myParams$lockdownCap, myParams$weekendCap, "\nReference line = WHO daily threshold (", 
        myParams$dailyPm10Threshold_WHO, ")"))
p <- addWeekendsDate(p, yMin, yMax)
p + facet_grid(site ~ .) + theme(strip.text.y.right = element_text(angle = 90))
PM10 levels, Southampton (daily mean)

Figure 8.3: PM10 levels, Southampton (daily mean)

Figure 8.4 and 8.5 show the % difference between the daily and weekly means for 2020 vs 2017-2019 (reference period).

plotDT <- makeDailyComparisonDT(pm10dt[site %like% "via AURN" & fixedDate >= myParams$comparePlotCut])

compareYearsDiffPlotDaily(plotDT) + labs(caption = paste0(myParams$lockdownCap))
## [1] "Max drop %:-79"
## [1] "Max increase %:203"
% difference in daily mean PM10 levels 2020 vs 2017-2019, Southampton

Figure 8.4: % difference in daily mean PM10 levels 2020 vs 2017-2019, Southampton

plotDT <- makeWeeklyComparisonDT(pm10dt[site %like% "via AURN" & fixedDate >= myParams$comparePlotCut])

compareYearsDiffPlotWeekly(plotDT, ldStart = myParams$lockDownStartDate, ldEnd = myParams$lockDownEndDate) + 
    labs(caption = paste0(myParams$lockdownCap))
% difference in weekly mean PM10 levels 2020 vs 2017-2019, Southampton

Figure 8.5: % difference in weekly mean PM10 levels 2020 vs 2017-2019, Southampton

Beware seasonal trends and meteorological affects

9 PM 2.5

yLab <- "PM 2.5 (ug/m3)"
pm25dt <- fixedDT[pollutant == "pm2.5"]

Figure 9.1 shows the most recent hourly data.

recentDT <- pm25dt[!is.na(value) & obsDate > myParams$recentCutDate]
p <- makeDotPlot(recentDT, xVar = "dateTimeUTC", xLab = "Date & Time", yVar = "value", byVar = "site", yLab = yLab)

p <- p + scale_x_datetime(date_breaks = "2 day", date_labels = "%a %d %b") + theme(axis.text.x = element_text(angle = 90, 
    hjust = 1)) + labs(caption = paste0(myParams$lockdownCap, myParams$weekendCap, myParams$noThresh))

yMax <- max(recentDT$value)
yMin <- min(recentDT$value)
p <- addLockdownDateTime(p, yMin, yMax)
addWeekendsDateTime(p, yMin, yMax)
PM2.5 levels, Southampton (hourly, recent)

Figure 9.1: PM2.5 levels, Southampton (hourly, recent)

Figure 9.2 shows the most recent hourly data by date and time of day.

recentDT[, `:=`(time, hms::as_hms(dateTimeUTC))]

yMin <- min(recentDT$time)
yMax <- max(recentDT$time)
p <- profileTilePlot(recentDT, yLab)
addWeekendsDate(p, yMin, yMax) + labs(caption = paste0(myParams$lockdownCap, myParams$weekendCap))
PM2.5 levels, Southampton (hourly, recent)

Figure 9.2: PM2.5 levels, Southampton (hourly, recent)

Figure 9.3 shows the most recent mean daily values compared to previous years.

plotDT <- pm25dt[site %like% "via AURN" & fixedDate <= lubridate::today() & fixedDate >= myParams$comparePlotCut, 
    .(meanVal = mean(value), medianVal = median(value), nSites = uniqueN(site)), keyby = .(fixedDate, compareYear, 
        site)]

# final plot - adds annotations
yMin <- min(plotDT$mean)
yMax <- max(plotDT$mean)

p <- compareYearsPlot(plotDT, xVar = "fixedDate", yVar = "meanVal", colVar = "compareYear")
p <- addLockdownDate(p, yMin, yMax) + geom_hline(yintercept = myParams$dailyPm2.5Threshold_WHO) + labs(x = "Date", 
    y = "Daily mean", caption = paste0(myParams$lockdownCap, myParams$weekendCap, "\nReference line = WHO daily threshold (", 
        myParams$dailyPm2.5Threshold_WHO, ")"))
p <- addWeekendsDate(p, yMin, yMax)
p + facet_grid(site ~ .) + theme(strip.text.y.right = element_text(angle = 90))
PM2.5 levels, Southampton (daily mean)

Figure 9.3: PM2.5 levels, Southampton (daily mean)

Figure 9.4 and 9.5 show the % difference between the daily and weekly means for 2020 vs 2017-2019 (reference period).

plotDT <- makeDailyComparisonDT(pm25dt[site %like% "via AURN" & fixedDate >= myParams$comparePlotCut])

compareYearsDiffPlotDaily(plotDT) + labs(caption = paste0(myParams$lockdownCap))
## [1] "Max drop %:-81"
## [1] "Max increase %:263"
% difference in daily mean PM2.5 levels 2020 vs 2017-2019, Southampton

Figure 9.4: % difference in daily mean PM2.5 levels 2020 vs 2017-2019, Southampton

plotDT <- makeWeeklyComparisonDT(pm25dt[site %like% "via AURN" & fixedDate >= myParams$comparePlotCut])

compareYearsDiffPlotWeekly(plotDT, ldStart = myParams$lockDownStartDate, ldEnd = myParams$lockDownEndDate) + 
    labs(caption = paste0(myParams$lockdownCap))
% difference in weekly mean PM2.5 levels 2020 vs 2017-2019, Southampton

Figure 9.5: % difference in weekly mean PM2.5 levels 2020 vs 2017-2019, Southampton

Beware seasonal trends and meteorological affects

10 Wind direction and speed

As noted above, air pollution levels in any given time period are highly dependent on the prevailing meteorological conditions.

Figure 10.1 shows the wind direction and speed over the period of lockdown and can be compared with the equivalent pollutant level plots above such as Figure 4.1.

# windDT[, .(mean = mean(wd)), keyby = .(site)] # they're identical across AURN sites
windDirDT <- fixedDT[pollutant == "wd" & site %like% "A33"]
windDirDT[, `:=`(wd, value)]
setkey(windDirDT, dateTimeUTC, site, source)
windSpeedDT <- fixedDT[pollutant == "ws" & site %like% "A33"]
windSpeedDT[, `:=`(ws, value)]
setkey(windSpeedDT, dateTimeUTC, site, source)

windDT <- windSpeedDT[windDirDT]
windDT[, `:=`(rTime, hms::as_hms(dateTimeUTC))]
p <- ggplot2::ggplot(windDT[obsDate > as.Date("2020-03-23")], aes(x = dateTimeUTC, y = ws, angle = -wd + 90, 
    colour = ws)) + geom_text(label = "→") + theme(legend.position = "bottom") + guides(colour = guide_legend(title = "Wind speed")) + 
    scale_color_continuous(high = "#132B43", low = "#56B1F7")  # normal blue reversed


yMin <- min(windDT[obsDate > as.Date("2020-03-23")]$ws)
yMax <- max(windDT[obsDate > as.Date("2020-03-23")]$ws)
p <- addWeekendsDateTime(p, yMin, yMax)
# p <- addLockdownDateTime(p, yMin, yMax)
p <- p + labs(y = "Wind speed", x = "Time", caption = paste0(myParams$weekendCap)) + theme(axis.text.x = element_text(angle = 90, 
    hjust = 1, size = 9))
p + xlim(lubridate::as_datetime("2020-03-23 23:59:59"), NA)  # do this last otherwise adding the weekends takes the plot back to the earliest weekend we annotate
Wind direction and speed in Southampton since 23rd March 2020

Figure 10.1: Wind direction and speed in Southampton since 23rd March 2020

Figure 10.2 shows a windrose for each of the periods of low/high pollutant levels visible in Figure 4.4:

  • 26 March - 4 April (lower NO2)
  • 7 April - 12 April (higher NO2)
  • 16 April - 23 April (lower NO2)

The windroses indicate the direction the prevailing wind was blowing from and the colour of the ‘paddles’ indicates the strength while the length of the paddles indicates the proportion of observations. As we can see there are clear differences in the wind conditions which correlate with the pollution patterns observed:

  • the first period with low NO2 was dominated by north-north easterly winds (likely to bring city and motorway air);
  • the second period when NO2 and particulates were high was dominated by low speed south easterly winds (bringing continental air);
  • the third period when NO2 was low was again dominated by north easterly winds.
fixedDT[, `:=`(aqPeriod, ifelse(obsDate >= as.Date("2020-03-26") & obsDate <= as.Date("2020-04-04"), "Period 1 - Low: 26/3 - 4/4", 
    NA))]
fixedDT[, `:=`(aqPeriod, ifelse(obsDate >= as.Date("2020-04-07") & obsDate <= as.Date("2020-04-12"), "Period 2 - High: 7/4 - 12/4", 
    aqPeriod))]
fixedDT[, `:=`(aqPeriod, ifelse(obsDate >= as.Date("2020-04-16") & obsDate <= as.Date("2020-04-23"), "Period 3 - Low: 16/4 - 23/4", 
    aqPeriod))]

plotDT <- fixedDT[!is.na(aqPeriod) & (pollutant == "ws" | pollutant == "wd") & site %like% "A33"]

t <- plotDT[, .(start = min(dateTimeUTC), end = max(dateTimeUTC)), keyby = .(aqPeriod)]

kableExtra::kable(t, caption = "Check period start/end times") %>% kable_styling()
Table 10.1: Check period start/end times
aqPeriod start end
Period 1 - Low: 26/3 - 4/4 2020-03-26 2020-04-04 23:00:00
Period 2 - High: 7/4 - 12/4 2020-04-07 2020-04-12 23:00:00
Period 3 - Low: 16/4 - 23/4 2020-04-16 2020-04-23 23:00:00
# make a dt openair will accept
wdDT <- plotDT[pollutant == "wd", .(dateTimeUTC, site, wd = value, aqPeriod)]
setkey(wdDT, dateTimeUTC, site, aqPeriod)
wsDT <- plotDT[pollutant == "ws", .(dateTimeUTC, site, ws = value, aqPeriod)]
setkey(wsDT, dateTimeUTC, site, aqPeriod)
wrDT <- wdDT[wsDT]
openair::windRose(wrDT, type = "aqPeriod")
Wind rose for Southampton sites since 23rd March 2020

Figure 10.2: Wind rose for Southampton sites since 23rd March 2020

11 Save data

Save long form fixed-date data to savedData for re-use.

fixedDT[, `:=`(weekDay, lubridate::wday(dateTimeUTC, label = TRUE, abbr = TRUE))]
f <- paste0(here::here(), "/savedData/sotonExtract2017_2020_v2.csv")
data.table::fwrite(fixedDT, f)
dkUtils::gzipIt(f)

Saved data description:

skimr::skim(fixedDT)
Table 11.1: Data summary
Name fixedDT
Number of rows 702315
Number of columns 19
_______________________
Column type frequency:
character 6
Date 3
factor 4
numeric 5
POSIXct 1
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
pollutant 0 1.00 2 5 0 13 0
source 0 1.00 4 8 0 2 0
site 0 1.00 26 38 0 4 0
ratified 0 1.00 1 1 0 3 0
compareYear 0 1.00 4 9 0 2 0
aqPeriod 692759 0.01 26 27 0 3 0

Variable type: Date

skim_variable n_missing complete_rate min max median n_unique
obsDate 0 1 2017-01-01 2020-05-29 2018-08-31 1245
date2020 0 1 2020-01-01 2020-12-30 2020-06-07 365
fixedDate 0 1 2019-12-29 2020-12-29 2020-06-05 367

Variable type: factor

skim_variable n_missing complete_rate ordered n_unique top_counts
origDoW 0 1 TRUE 7 Sat: 100993, Fri: 100881, Sun: 100752, Wed: 100211
day2020 0 1 TRUE 7 Wed: 111096, Mon: 100850, Tue: 100653, Fri: 99421
fixedDoW 0 1 TRUE 7 Sat: 100993, Fri: 100881, Sun: 100752, Wed: 100211
weekDay 0 1 TRUE 7 Sat: 100993, Fri: 100881, Sun: 100752, Wed: 100211

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
value 0 1 40.82 68.32 -9.6 4.85 15.60 42.00 1058.00 ▇▁▁▁▁
year 0 1 2018.18 0.98 2017.0 2017.00 2018.00 2019.00 2020.00 ▇▇▁▇▂
month 0 1 6.13 3.48 1.0 3.00 6.00 9.00 12.00 ▇▅▃▅▆
decimalDate 0 1 2018.65 0.96 2017.0 2017.81 2018.66 2019.45 2020.41 ▇▇▇▇▆
weekNo 0 1 24.80 15.18 1.0 12.00 23.00 38.00 53.00 ▇▇▆▆▆

Variable type: POSIXct

skim_variable n_missing complete_rate min max median n_unique
dateTimeUTC 0 1 2017-01-01 2020-05-29 23:00:00 2018-08-31 08:00:00 29880

Saved data sites by year:

t <- table(fixedDT$site, fixedDT$year)

kableExtra::kable(t, caption = "Sites available by year") %>% kable_styling()
Table 11.2: Sites available by year
2017 2018 2019 2020
Southampton - Onslow Road (near RSH) 25307 25755 24762 6408
Southampton - Victoria Road (Woolston) 19251 23091 11541 6195
Southampton A33 (via AURN) 67278 62214 65751 23483
Southampton Centre (via AURN) 103806 100155 105871 31447

Saved pollutants by site:

t <- table(fixedDT$site, fixedDT$pollutant)

kableExtra::kable(t, caption = "Pollutants available by site") %>% kable_styling()
Table 11.3: Pollutants available by site
no no2 nox nv10 nv2.5 o3 pm10 pm2.5 so2 v10 v2.5 wd ws
Southampton - Onslow Road (near RSH) 27412 27408 27412 0 0 0 0 0 0 0 0 0 0
Southampton - Victoria Road (Woolston) 20026 20026 20026 0 0 0 0 0 0 0 0 0 0
Southampton A33 (via AURN) 29426 29426 29426 23210 0 0 25468 0 0 23210 0 29280 29280
Southampton Centre (via AURN) 28442 28442 28443 21105 22627 28432 25964 27486 28046 21105 22627 29280 29280

NB:

  • ws = wind speed
  • wd = wind direction
  • v* = volatiles

We have also produced wind/pollution roses for these sites.

12 Annex

12.1 Missing data

Several of these datasets suffer from missing data or have stopped updating. This is visualised below for all data for all sites from January 2020.

# dt,xvar, yvar,fillVar, yLab
tileDT <- fixedDT[pollutant == "no2" & dateTimeUTC > as.Date("2020-02-01") & !is.na(value)]
p <- makeTilePlot(tileDT, xVar = "dateTimeUTC", xLab = "Date & Time", yVar = "site", fillVar = "value", yLab = yLab)

p + scale_x_datetime(date_breaks = "7 day", date_labels = "%a %d %b") + theme(axis.text.x = element_text(angle = 90, 
    hjust = 1))
Nitrogen Dioxide data availability and levels over time

Figure 12.1: Nitrogen Dioxide data availability and levels over time

# dt,xvar, yvar,fillVar, yLab
tileDT <- fixedDT[pollutant == "nox" & dateTimeUTC > as.Date("2020-02-01") & !is.na(value)]
p <- makeTilePlot(tileDT, xVar = "dateTimeUTC", xLab = "Date & Time", yVar = "site", fillVar = "value", yLab = yLab)

p + scale_x_datetime(date_breaks = "7 day", date_labels = "%a %d %b") + theme(axis.text.x = element_text(angle = 90, 
    hjust = 1))
Oxides of nitrogen data availability and levels over time

Figure 12.2: Oxides of nitrogen data availability and levels over time

# dt,xvar, yvar,fillVar, yLab
tileDT <- fixedDT[pollutant == "so2" & dateTimeUTC > as.Date("2020-02-01") & !is.na(value)]
p <- makeTilePlot(tileDT, xVar = "dateTimeUTC", xLab = "Date & Time", yVar = "site", fillVar = "value", yLab = yLab)

p + scale_x_datetime(date_breaks = "7 day", date_labels = "%a %d %b") + theme(axis.text.x = element_text(angle = 90, 
    hjust = 1))
Sulphour Dioxide data availability and levels over time

Figure 12.3: Sulphour Dioxide data availability and levels over time

tileDT <- fixedDT[pollutant == "o3" & dateTimeUTC > as.Date("2020-02-01") & !is.na(value)]
p <- makeTilePlot(tileDT, xVar = "dateTimeUTC", xLab = "Date & Time", yVar = "site", fillVar = "value", yLab = yLab)

p + scale_x_datetime(date_breaks = "7 day", date_labels = "%a %d %b") + theme(axis.text.x = element_text(angle = 90, 
    hjust = 1))
Availability and level of o3 data over time

Figure 12.4: Availability and level of o3 data over time

tileDT <- fixedDT[pollutant == "pm10" & dateTimeUTC > as.Date("2020-02-01") & !is.na(value)]
p <- makeTilePlot(tileDT, xVar = "dateTimeUTC", xLab = "Date & Time", yVar = "site", fillVar = "value", yLab = yLab)

p + scale_x_datetime(date_breaks = "7 day", date_labels = "%a %d %b") + theme(axis.text.x = element_text(angle = 90, 
    hjust = 1))
Availability and level of PM 10 data over time

Figure 12.5: Availability and level of PM 10 data over time

tileDT <- fixedDT[pollutant == "pm2.5" & dateTimeUTC > as.Date("2020-02-01") & !is.na(value)]
p <- makeTilePlot(tileDT, xVar = "dateTimeUTC", xLab = "Date & Time", yVar = "site", fillVar = "value", yLab = yLab)

p + scale_x_datetime(date_breaks = "7 day", date_labels = "%a %d %b") + theme(axis.text.x = element_text(angle = 90, 
    hjust = 1))
Availability and level of PM 2.5 data over time

Figure 12.6: Availability and level of PM 2.5 data over time

12.2 Experiments with openair

The openair R package (Carslaw and Ropkins 2012) offers a number of pre-formed plot functions which are of potential use.

12.2.2 24 hour patterns with timeVariation

openair’s timeVariation function provides plots by time of day and weekday. Figure 12.9 shows the pattern for NO2 in Southampton Centre over the Figure 12.10 shows the same plot but for the A33 site. In each case we compare the period before lockdown (from the start of 2019) with the period since lockdown (from 2020-03-24).

These quite clearly show the difference in pollution at for pre and during lockdown for specific times of day and days of the week.

no2dt[, `:=`(date, dateTimeUTC)]
no2dt[, `:=`(lockdown, ifelse(dateTimeUTC <= myParams$lockDownStartDate, "Pre lockdown", "Lockdown"))]

openair::timeVariation(no2dt[site %like% "Centre" & year >= cutYear], "no2", ylab = "NO2 (ppb)", group = "lockdown")
timeVariation plots for NO2 at Southampton Centre comparing lockdown 2020 with pre-lockdown starting in 2019

Figure 12.9: timeVariation plots for NO2 at Southampton Centre comparing lockdown 2020 with pre-lockdown starting in 2019

openair::timeVariation(no2dt[site %like% "A33" & year > cutYear], "no2", ylab = "NO2 (ppb)", group = "lockdown")
timeVariation plots for NO2 at Southampton A33 site comparing lockdown 2020 with pre-lockdown starting in 2019

Figure 12.10: timeVariation plots for NO2 at Southampton A33 site comparing lockdown 2020 with pre-lockdown starting in 2019

13 Runtime

Report generated using knitr in RStudio with R version 3.6.0 (2019-04-26) running on x86_64-redhat-linux-gnu (#1 SMP Tue Feb 18 16:39:12 EST 2020).

t <- proc.time() - myParams$startTime

elapsed <- t[[3]]

Analysis completed in 71.623 seconds ( 1.19 minutes).

R packages used in this report:

  • data.table - (Dowle et al. 2015)
  • ggplot2 - (Wickham 2009)
  • here - (Müller 2017)
  • kableExtra - (Zhu 2019)
  • lubridate - (Grolemund and Wickham 2011)
  • openAir - (Carslaw and Ropkins 2012)
  • skimr - (Arino de la Rubia et al. 2017)
  • viridis - (Garnier 2018)

References

Arino de la Rubia, Eduardo, Hao Zhu, Shannon Ellis, Elin Waring, and Michael Quinn. 2017. Skimr: Skimr. https://github.com/ropenscilabs/skimr.

Carslaw, David C., and Karl Ropkins. 2012. “Openair — an R Package for Air Quality Data Analysis.” Environmental Modelling & Software 27–28 (0): 52–61. doi:10.1016/j.envsoft.2011.09.008.

Dowle, M, A Srinivasan, T Short, S Lianoglou with contributions from R Saporta, and E Antonyan. 2015. Data.table: Extension of Data.frame. https://CRAN.R-project.org/package=data.table.

Garnier, Simon. 2018. Viridis: Default Color Maps from ’Matplotlib’. https://CRAN.R-project.org/package=viridis.

Grolemund, Garrett, and Hadley Wickham. 2011. “Dates and Times Made Easy with lubridate.” Journal of Statistical Software 40 (3): 1–25. http://www.jstatsoft.org/v40/i03/.

Müller, Kirill. 2017. Here: A Simpler Way to Find Your Files. https://CRAN.R-project.org/package=here.

Wickham, Hadley. 2009. Ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York. http://ggplot2.org.

Zhu, Hao. 2019. KableExtra: Construct Complex Table with ’Kable’ and Pipe Syntax. https://CRAN.R-project.org/package=kableExtra.